import pytest
from openpyxl.reader.excel import load_workbook

class ExcelData:
    def Login_success(self):
        data = []
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet=wb.sheetnames
        st = wb[sheet[0]]
        data = [[st.cell(row=i,column=j).value for j in range(1,4)]for i in range(2,5)]
        return data
    def Login_fail(self):
        data = []
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet=wb.sheetnames
        st = wb[sheet[2]]
        data = [[st.cell(row=i,column=j).value for j in range(1,4)]for i in range(2,6)]
        return data

    def login_readurl(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        st = wb[sheet[1]]
        cell = st.cell(row=2, column=1)
        cell_value = cell.value
        return cell_value
    def enroll_readurl(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        st = wb[sheet[1]]
        cell = st.cell(row=3, column=1)
        cell_value = cell.value
        return cell_value

    def enroll_data1(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        st = wb[sheet[3]]
        data = [[st.cell(row=i,column=j).value for j in range(1,4)]for i in range(2,3)]
        return data

    def enroll_data2(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        st = wb[sheet[3]]
        data = [[st.cell(row=i,column=j).value for j in range(1,4)]for i in range(3,4)]
        return data

    def enroll_data3(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        st = wb[sheet[3]]
        data = [[st.cell(row=i,column=j).value for j in range(1,4)]for i in range(4,5)]
        return data

    def enroll_data4(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        st = wb[sheet[3]]
        data = [[st.cell(row=i,column=j).value for j in range(1,5)]for i in range(5,6)]
        return data

    def enroll_data5(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        st = wb[sheet[3]]
        data = [[st.cell(row=i,column=j).value for j in range(1,4)]for i in range(6,7)]
        return data

    def yinhangka1(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[4]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(2, 3)]
        return data

    def yinhangka2(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[4]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(3, 4)]
        return data

    def yinhangka3(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[4]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(4, 5)]
        return data

    def yinhangka4(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[4]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 6)] for i in range(5, 6)]
        return data

    def yinhangka5(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[4]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(6, 7)]
        return data

    def yinhangka6(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[4]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 6)] for i in range(7, 8)]
        return data

    def yinhangka7(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[4]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 6)] for i in range(8, 9)]
        return data

    def yinhangka8(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[4]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 4)] for i in range(9, 10)]
        return data

    def yinhangka9(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[4]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(10, 11)]
        return data

    def jijin1(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[5]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(2, 3)]
        return data

    def jijin2(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[5]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(3, 4)]
        return data

    def jijin3(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[5]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(4, 5)]
        return data

    def jijin4(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[5]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(5, 6)]
        return data

    def jijin5(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[5]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(6, 7)]
        return data

    def jijin6(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[5]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(7, 8)]
        return data

    def jijin7(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[5]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(8, 9)]
        return data

    def jijin8(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[5]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(9, 10)]
        return data

    def jijin9(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[5]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(10, 11)]
        return data

    def jijin10(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[5]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(11, 12)]
        return data

    def jijin11(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[5]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 6)] for i in range(12, 13)]
        return data

    def wangdai1(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[6]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(2, 3)]
        return data

    def wangdai2(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[6]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 4)] for i in range(3, 4)]
        return data

    def wangdai3(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[6]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 6)] for i in range(4, 5)]
        return data

    def wangdai4(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[6]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 6)] for i in range(5, 6)]
        return data

    def wangdai5(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[6]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(6, 7)]
        return data

    def wangdai6(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[6]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(7, 8)]
        return data

    def wangdai7(self):
        wb = load_workbook(filename=r"D:\software_test_file\Financial2\financial测试数据.xlsx")
        sheet = wb.sheetnames
        print(sheet)
        st = wb[sheet[6]]
        data = [[st.cell(row=i, column=j).value for j in range(1, 5)] for i in range(8, 9)]
        return data
# if __name__ == '__main__':
#     login = LoginData()
#     print(login.readdataadd())
